<%@ page contentType="text/html;charset=UTF-8" %>

<style type="text/css">
    .logout-btn {
        padding-left: 40px !important;
        padding-right: 40px !important;
        display: block;
        height: 35px !important;
        line-height: 35px !important;
        margin-top: 9px;
        margin-right: 30px !important;
    }
</style>
<!--头部-->
<nav class="header-public">
    <div class="header-public-main">
        <div class="header-public-logo">
            <h1>
                <a href="javascript:void(0);"> <img title="同行者" alt="同行者" src="${ctx}/image/logo_white.png"/></a>
            </h1>
        </div>
        <ul class="header-public-nav-r">
            <c:if test="${not empty sessionScope.newCurrentUser}">
                <c:if test="${not empty sessionScope.businessPublisher}">
                    <li>
                        <div class="header-user-info">
                            <div class="user-logo" style="background-image: url(${sessionScope.businessPublisher.logo}"></div>
                            <span class="user-name">${sessionScope.businessPublisher.realname}</span>
                        </div>
                    </li>
                </c:if>
                <li>
                    <a id="logout" href="javascript:void(0);"
                       class="layui-btn layui-btn-danger layui-btn-sm logout-btn">退出</a>
                </li>
            </c:if>
        </ul>
    </div>
</nav>
<div class="header-public-bot"></div>
<div class="right-nav-content"><a class="dn" id="top_back" href="javascript:void(0);"><i
        class="iconfont icon-totop f30"></i></a></div>
<script type="text/javascript">
    $(function () {
        $('#logout').on('click', function () {
            $.post('${ctx}/user/login/logout.do', function (res) {
                if (res.success) {
                    location.href = "${ctx}/thirdLogin.do"
                } else {
                    util.layerAlertError(res.description)
                }
            });
        });
    })
</script>